package com.bdqn.desiremall.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Mall_Order {
    private Integer orderId;

    private Double orderTotal;

    private Integer stateId;

    private Integer userId;

    private Date orderOrderTime;

    private Integer addressId;

    private String orderIdRemarks;
    
    private Mall_User user;
    
    private Mall_ShippingAddress address;
    
    

    
    
    public Mall_User getUser() {
		return user;
	}

	public void setUser(Mall_User user) {
		this.user = user;
	}

	public Mall_ShippingAddress getAddress() {
		return address;
	}

	public void setAddress(Mall_ShippingAddress address) {
		this.address = address;
	}

	@Override
	public String toString() {
		return "Mall_Order [orderId=" + orderId + ", orderTotal=" + orderTotal
				+ ", stateId=" + stateId + ", userId=" + userId
				+ ", orderOrderTime=" + orderOrderTime + ", addressId="
				+ addressId + ", orderIdRemarks=" + orderIdRemarks + "]";
	}

	public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Double getOrderTotal() {
        return orderTotal;
    }

    public void setOrderTotal(Double orderTotal) {
        this.orderTotal = orderTotal;
    }

    public Integer getStateId() {
        return stateId;
    }

    public void setStateId(Integer stateId) {
        this.stateId = stateId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getOrderOrderTime() {
    	SimpleDateFormat sdf =null;
    	if (null!=orderOrderTime) {
			 sdf = new SimpleDateFormat("yyyy-MM-dd");
			 return sdf.format(orderOrderTime);
			
    	}else{
    		 return null;
    	}
       
    }

    public void setOrderOrderTime(Date orderOrderTime) {
        this.orderOrderTime = orderOrderTime;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    public String getOrderIdRemarks() {
        return orderIdRemarks;
    }

    public void setOrderIdRemarks(String orderIdRemarks) {
        this.orderIdRemarks = orderIdRemarks == null ? null : orderIdRemarks.trim();
    }
}